<?xml version="1.0" encoding="UTF-8" ?>
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	<!-- ADICIONAR GRID 500PX, COM 20 PARTES DE 25PX -->
	<p:dialog widgetVar="promptBuscaAluno" modal="true" width="500"
		closable="true" header="Buscar Aluno" minWidth="500"
		>
		<h:form id="formPromptBuscaAluno" prependId="false">
			<div>
				<h:outputLabel value="Nome: " />
	    			<p:inputText value="#{alunoBean.variavelBusca}" style="width: 260px;"/>
	    	 	<p:spacer width="20"/> <p:commandButton value="Filtrar" action="#{alunoBean.filtrarAluno}" update="dataTableBuscaAluno" />
	    	 	<br/><br/> 
			</div>
			<div>
				<p:dataTable id="dataTableBuscaAluno" widgetVar="dataTableBuscaAluno" paginator="true"
					var="aluno"
					selection="#{alunoBean.alunoInstanceTemp}"
					value="#{alunoBean.alunoList}" selectionMode="single"
					emptyMessage="Nenhum registro encontrado!"
					dynamic="true"
					rows="10">
					<p:column headerText="Alunos">  
			            <h:outputText value="#{aluno.nomeCompleto}" />  
			        </p:column>  
				</p:dataTable>
			</div>
			<div style="text-align: right;">
           		<br/><p:separator /><br/>  
                <p:commandButton action="#{alunoBean.selecionarAluno}" value="Selecionar" update="formPrincipal, formPromptBuscaAluno, formMudarStatus" oncomplete="promptBuscaAluno.hide()"/>
                <p:commandButton value="Cancelar" onclick="promptBuscaAluno.hide()" oncomplete="promptBuscaAluno.hide()"/>
            </div>
		</h:form>
	</p:dialog>
</f:view>